{% extends 'base.html' %}

{% block content %}
  {{ super() }}
  <form action="." class="form-horizontal" id="model-list" method="post"><input type="hidden" name="action" value="" />
    {% if csrf_token %}{# Support for flask-seasurf #}<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">{% endif %}
    <div class="panel-body">
      <div class="list-op" id="list_op">
        <button type="button" class="btn btn-default btn-sm">
          <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
        </button>
        <button type="button" class="btn btn-default btn-sm">
          <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
        </button>
        <button type="button" class="btn btn-default btn-sm">
          <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
        </button>
      </div>
    </div>
    <table class="table table-bordered table-condensed table-striped table-responsive table-hover">
      <thead>
      <tr>
        {% for key in titles %}
          <th>{{ key }}</th>
        {% endfor %}
{#        <th>功能</th>#}
      </tr>
      </thead>
      <tbody>
      {% for new_obj in page_data.items %}
        <tr>
          {% for key in titles %}
            <td>{{ get_model_field(new_obj, key) }}</td>
          {% endfor %}
{#          <td><a class="btn btn-info" href="#">修改</a>
            <a class="btn btn-danger" href="javscript:;">删除</a></td>#}
        </tr>
      {% endfor %}
      </tbody>
    </table>
  </form>
  {% include "includes/pagination.html" %}
{% endblock %}
{% block extrajs %}
  {% include "includes/script_checkbox.html" %}
{% endblock %}